﻿using Engine;
using Game.Server.Event;
using Game.Server.PlayerEvent;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using System;
using Game.NetWork.Packages;
using Game.NetWork;
using System.Text;

namespace Game.Server.Plugins
{
    public class ClearLowLevelZHPlugin : ServerPlugin, IBlockChangeEventHandle
    {
        public override int Version => 10000;

        public override string Name => "清除低高空方块";

        public byte FirstLevel => 0;

        public bool ChangeCell(int x, int y, int z, int oldValue, int newValue, ComponentMiner componentMiner)
        {
            if(y <= 5 || y >= 250) return false;
            return true;
        }

        public override void Initialize()
        {
            BlockChangeEventManager.AddObject(this);
        }

        
        public void OnTerrainContentsGenerated(TerrainUpdater terrainUpdater, TerrainChunk chunk)
        {
        }

        public override void Load()
        {
        }

        public override void Save()
        {
        }
    }
}